package com.reder.practice.bean.extend;

import com.reder.practice.bean.Follower;

import java.util.Date;

/**
 * 关注者类拓展方法类
 *
 * @author Fish
 * <p>Email: fishinlove@163.com</p>
 * <p>created by 2019/09/23 19:25:25</p>
 */
public class FollowerExtend {

    /**
     * 生成 Follower 对象
     *
     * @param followerId 关注者 id
     * @param userId 要被关注的对象的 id
     * @return 返回产生的对象
     */
    public static Follower newFollower(long followerId, long userId) {
        Follower follower = new Follower();
        follower.setUserId(userId);
        follower.setFollowerId(followerId);
        follower.setCreateTime(new Date());
        return follower;
    }
}
